package com.example.demo.thread;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class ThreadPool implements Runnable{

    public static void main(String[] args) {
        ExecutorService executorService = Executors.newFixedThreadPool(10);
        for (int i=0;i<10;i++){
            executorService.execute(new ThreadPool());
        }

    }

    @Override
    public void run() {
        System.out.println("当前线程："+Thread.currentThread());
    }
}
